/**
 * Position.java
 *
 * Fecha de creación: May 6, 2012,12:17:47 AM
 *
 * Autor: José Ignacio Rivero Dávila
 */

package util;


public class Position {
    public int i;
    public int j;
    public Position(int i, int j){
        this.i=i;
        this.j=j;
    }
    public Position(){
        i=-1;
        j=-1;
    }
    @Override
    public String toString(){
        return "["+i+", "+j+"]";
    }
    @Override
    public boolean equals(Object o){
        Position other=(Position)o;
        boolean compI=other.i==this.i;
        boolean compJ=other.j==this.j;
        return compI && compJ;
    }
    public int[] toArray(){
        int [] pos =  {i,j};
        return pos;
    }

}
